package web.fabrimind.qc.domain;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import web.fabrimind.common.annotation.Excel;
import web.fabrimind.common.core.domain.BaseEntity;

/**
 * 质量检验对象 quality_inspection
 *
 * @author ruoyi
 * @date 2025-03-25
 */
public class QualityInspection extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 检验ID
     */
    private Long inspectionId;

    /**
     * 检验编号
     */
    @Excel(name = "检验编号")
    private String inspectionCode;

    /**
     * 关联工单ID
     */
    @Excel(name = "关联工单ID")
    private Long orderId;

    /**
     * 产品ID
     */
    @Excel(name = "产品ID")
    private Long productId;

    /**
     * 检验时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "检验时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date inspectionTime;

    /**
     * 抽样数量
     */
    @Excel(name = "抽样数量")
    private Long sampleQuantity;

    /**
     * 合格数量
     */
    @Excel(name = "合格数量")
    private Long qualifiedQuantity;

    /**
     * 不合格数量
     */
    @Excel(name = "不合格数量")
    private Long unqualifiedQuantity;

    /**
     * 检验结果（0:不合格 1:合格）
     */
    @Excel(name = "检验结果", readConverterExp = "0=:不合格,1=:合格")
    private String result;

    /**
     * 关联工单
     */
    @Excel(name = "关联工单")
    private String orderCode;

    /**
     * 产品名称
     */
    @Excel(name = "产品名称")
    private String productName;

    public String getOrderCode() {
        return orderCode;
    }

    public void setOrderCode(String orderCode) {
        this.orderCode = orderCode;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public void setInspectionId(Long inspectionId) {
        this.inspectionId = inspectionId;
    }

    public Long getInspectionId() {
        return inspectionId;
    }

    public void setInspectionCode(String inspectionCode) {
        this.inspectionCode = inspectionCode;
    }

    public String getInspectionCode() {
        return inspectionCode;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public Long getProductId() {
        return productId;
    }


    public void setInspectionTime(Date inspectionTime) {
        this.inspectionTime = inspectionTime;
    }

    public Date getInspectionTime() {
        return inspectionTime;
    }

    public void setSampleQuantity(Long sampleQuantity) {
        this.sampleQuantity = sampleQuantity;
    }

    public Long getSampleQuantity() {
        return sampleQuantity;
    }

    public void setQualifiedQuantity(Long qualifiedQuantity) {
        this.qualifiedQuantity = qualifiedQuantity;
    }

    public Long getQualifiedQuantity() {
        return qualifiedQuantity;
    }

    public void setUnqualifiedQuantity(Long unqualifiedQuantity) {
        this.unqualifiedQuantity = unqualifiedQuantity;
    }

    public Long getUnqualifiedQuantity() {
        return unqualifiedQuantity;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public String getResult() {
        return result;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("inspectionId", getInspectionId())
                .append("inspectionCode", getInspectionCode())
                .append("orderId", getOrderId())
                .append("productId", getProductId())
                .append("inspectionTime", getInspectionTime())
                .append("sampleQuantity", getSampleQuantity())
                .append("qualifiedQuantity", getQualifiedQuantity())
                .append("unqualifiedQuantity", getUnqualifiedQuantity())
                .append("result", getResult())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .append("productName", getProductName())
                .append("orderCode", getOrderCode())
                .toString();
    }
}
